home *** CD-ROM | disk | FTP | other *** search
- ; This is an example of AAS
- ; instruction, it is used to
- ; subtract huge BCD numbers.
-
- #make_COM#
-
- ORG 100h
-
- ; make 5 - 9
- ; AL = 0FCh (not BCD form)
- MOV AL, 05h
- MOV BL, 09h
- SUB AL, BL
-
-
- ; convert to BCD,
- ; AL = 6
- ; (and 1 is borrowed from AH,
- ; like calculating 15 - 9):
- AAS
-
- ; convert to printable symbol:
- OR AL, 30h
-
- ; print char in AL using BIOS
- ; teletype function:
- MOV AH, 0Eh
- INT 10h
-
- RET
-
- END